<?php
/* @var $this MoneditorsController */
/* @var $model Moneditors */
/* @var $form CActiveForm */
?>

<div class="form">

	<?php
		$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
			'id'=>'moneditors-form',
			'type'=>'horizontal',
			'enableAjaxValidation'=>false,
			'htmlOptions' => array('enctype'=>'multipart/form-data', 'class'=>'well'),
		)); 
	?>

	<?php echo $form->errorSummary($model); ?>

	<?php if (Yii::app()->user->name!='voronina' && Yii::app()->user->name!='ejov' && Yii::app()->user->name!='samkova' && Yii::app()->user->name!='fomichev'): ?>
	<div class="row">
		<?php echo $form->labelEx($model,'fio'); ?>
		<?php $listFio = array(
				'' => 'Выбрать',
				'voronina' => 'Воронина',
				'zaslavsky' => 'Заславский', 
				'ejov' => 'Ежов',
				'karabuto' => 'Карабуто',
				'samkova' => 'Самкова',
				'fomichev' => 'Фомичев',
				'chanov' => 'Чанов',					
			);
		?>
		<?php echo $form->dropDownList($model,'fio',$listFio,array('options'=>array(Yii::app()->user->name=>array('selected'=>true)))); ?>
		<?php echo $form->error($model,'fio'); ?>
	</div>
	<?php endif; ?>

	<div class="row">
		<?php echo $form->labelEx($model,'journal'); ?>
		<?php $listJournal = array(
				'' => 'Выбрать',
				'sst' => 'ССТ',
				'ek' => 'ЭК', 
				'ekse' => 'ЭКСЭ',
				've' => 'ВЭ',
				'lm' => 'Лайтинг',
				'elcom' => 'Элком',					
			);
		?>
		<?php echo $form->dropDownList($model,'journal',$listJournal); ?>
		<?php echo $form->error($model,'journal'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'num'); ?>
		<?php $listNum = array(
				'' => 'Выбрать',
				'1' => '1',
				'2' => '2', 
				'3' => '3',
				'4' => '4',
				'5' => '5',
				'6' => '6',
				'7' => '7',
				'8' => '8', 
				'9' => '9',
				'10' => '10',
				'11' => '11',
				'12' => '12',					
			);
		?>
		<?php echo $form->dropDownList($model,'num',$listNum); ?>			
		<?php echo $form->error($model,'num'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'author'); ?>
		<?php echo $form->textField($model,'author',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'author'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>300)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<?php if (Yii::app()->user->name!='voronina' && Yii::app()->user->name!='ejov' && Yii::app()->user->name!='samkova' && Yii::app()->user->name!='fomichev'): ?>
		<div class="row">
			<?php echo $form->labelEx($model,'dif'); ?>
			<?php echo $form->textField($model,'dif',array('size'=>30,'maxlength'=>30)); ?>
			<?php echo $form->error($model,'dif'); ?>
		</div>
	<?php endif; ?>

	<div class="row">
		<?php echo $form->labelEx($model,'count'); ?>
		<?php echo $form->textField($model,'count',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'count'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
		<?php $listType = array(
				'' => 'Выбрать',
				'auth' => 'Авторство',
				'edit' => 'Редактирование', 
				'tran' => 'Перевод',
				'read' => 'Вычитка',					
			);
		?>
		<?php echo $form->dropDownList($model,'type',$listType); ?>
		<?php echo $form->error($model,'type'); ?>
	</div>

	<?php if (Yii::app()->user->name!='voronina' && Yii::app()->user->name!='ejov' && Yii::app()->user->name!='samkova' && Yii::app()->user->name!='fomichev'): ?>
		<div class="row">
			<?php echo $form->labelEx($model,'pay'); ?>
			<?php echo $form->textField($model,'pay',array('size'=>30,'maxlength'=>30)); ?>
			<?php echo $form->error($model,'pay'); ?>
		</div>
	<?php endif; ?>
	</br>
	<div class="row buttons">
		<?php
			$this->widget('bootstrap.widgets.TbButton', array(
				'label' => $model->isNewRecord ? 'Создать' : 'Сохранить',
				'buttonType' => 'submit',
				'size' => 'Normal', 
			));
		?>	
		<?php
			$this->widget('bootstrap.widgets.TbButton', array(
				'label'=>'Отмена',
				'size'=>'Normal', 
				'url'=>array('admin'),
			));
		?>		
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->